package com.z996.spring6;

import com.z996.spring6.pojo.School;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 简述:<br>
 * 实验六：数组类型赋值
 *
 * @Author zfh18
 * @Date 2024-02-02 15:27
 * @Version 1.0
 **/
public class DIArrayTest {
    private Logger logger = LoggerFactory.getLogger(DIArrayTest.class);


    /**
     * @Description 根据id 和 类型获取
     * @Author zfh18
     * @Date 15:38 2024-02-02
     **/
    @Test
    public void testByClassAndId() {

        ApplicationContext context = new ClassPathXmlApplicationContext("bean-DI-Array.xml");
        School school = context.getBean("school", School.class);
        logger.info("对象信息:{}", school.toString());

    }

}
